
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using facade.Factory.SimpleFactory;
using util.AttributeExtension;
using util.EnumExtion;

namespace openapi
{
    /// <summary>
    /// 简单工厂
    /// </summary>
    [ApiController]
    [Route("[controller]")]
    //[ApiExplorerSettings(GroupName = "SimpleFacotry")]
    //[ApiGroupName("SimpleFacotry")]
    [ApiGroupName(ApiGroupNameEnum.SimpleFacotry)]
    public class SimpleFacotryController:ControllerBase
    {
        /// <summary>
        /// 吃东西
        /// </summary>
        /// <param name="foodName"></param>
        /// <returns></returns>
         [HttpGet("Eat")]
        public string Eat(string foodName)
        {
            var food=new MCD().GetFood(foodName);
            return food.Eat();
        }
        
    }
}